package com.byp.java_sport.model;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

@Schema(description = "分页参数")
public class PageParams<T>{
    @Getter
    @Setter
    @Schema(description = "当前页码")
    private Integer pageNum;
    @Getter
    @Setter
    @Schema(description = "页容量")
    private Integer pageSize;

    @Getter
    @Setter
    @Schema(description = "请求参数")
    private T params;

    @Schema(hidden = true)
    public Page<T> getPage(){
        return new Page<>(pageNum,pageSize);
    }



}
